package net.csdn.business.kanban.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @ClassName KanbanStatus
 * @Description TODO
 * @Author liuzhisheng
 * @Date 2023/9/14
 **/
@Getter
@AllArgsConstructor
public enum KanbanStatusEnums {
    CLOSE(0,"close","关闭"),
    OPEN(1,"open","打开");
    final Integer code;
    final String value;
    final String msg;

    public static KanbanStatusEnums ofCode(Integer code) {
        for (KanbanStatusEnums type : KanbanStatusEnums.values()) {
            if (type.code.equals(code)) {
                return type;
            }
        }
        throw new IllegalArgumentException("KanbanStatusEnums param error");
    }
}
